Learn R Programming

Momocs (version 0.1-03)

Utilities: color palettes: Some color palettes.

Description

col.summer, col.india, col.sari and col.gallus are standard color palettes, obtained with colorRampPalette. col.bcol and col.wcol are used to generate a palette from one color to black or white, respectively.

Usage

col.summer(n)
col.sari(n)
col.gallus(n)
col.india(n)
col.bcol(col.hex)
col.wcol(col.hex)

Arguments

n
integer. The number of colors to create.
col.hex
An hexadecimal character string coding for a color.

Value

  • A vector of hexadecimal color that can be passed to many methods and functions of Momocs and also used as a classic color palette in all R base.

Examples

Run this code
pie(rep(1, 12), col=col.summer(12), main="col.summer")
pie(rep(1, 12), col=col.india(12),  main="col.india")
pie(rep(1, 12), col=col.sari(12),   main="col.sari")
pie(rep(1, 12), col=col.gallus(12), main="col.gallus")
pie(rep(1, 12), col=col.bcol(col.hex="#FF6600")(12), main="col.bcol and some orange")
pie(rep(1, 12), col=col.wcol(col.hex="#000080")(12), main="col.bcol and some blue")
barplot(1:33, col=col.summer(33))

Run the code above in your browser using DataLab